home *** CD-ROM | disk | FTP | other *** search
- --- ../tk4.1/generic/tkScale.c Wed Mar 27 14:53:41 1996
- +++ tkScale.c Mon Jul 8 19:24:13 1996
- @@ -14,6 +14,8 @@
- * Copyright (c) 1990-1994 The Regents of the University of California.
- * Copyright (c) 1994-1995 Sun Microsystems, Inc.
- *
- + * TkStep modifications (c) 1996 Andy Lo A Foe
- + *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- @@ -93,8 +95,10 @@
- Tk_3DBorder activeBorder; /* For drawing the slider when active. */
- int sliderRelief; /* Is slider to be drawn raised, sunken, etc. */
- XColor *troughColorPtr; /* Color for drawing trough. */
- + XColor *darkPtr;
- GC troughGC; /* For drawing trough. */
- GC copyGC; /* Used for copying from pixmap onto screen. */
- + GC troughBackGC;
- XFontStruct *fontPtr; /* Information about text font, or NULL. */
- XColor *textColorPtr; /* Color for drawing text. */
- GC textGC; /* GC for drawing text in normal mode. */
- @@ -103,6 +107,7 @@
- int highlightWidth; /* Width in pixels of highlight to draw
- * around widget when it has the focus.
- * <= 0 means don't draw a highlight. */
- + Pixmap stipple;
- XColor *highlightBgColorPtr;
- /* Color for drawing traversal highlight
- * area when highlight is off. */
- @@ -207,6 +212,18 @@
-
- #define PRINT_CHARS 150
-
- +
- +/*
- + * If you want to make Tk ignore attribute settings that may be violating
- + * NEXTSTEP(tm) styles leave DISABLE_FORCE_STEP undef'ed, otherwise define it
- + * somewhere
- + */
- +#ifndef DISABLE_FORCE_STEP
- +# define DISABLE_CHANGE TK_CONFIG_DONT_CHANGE_DEFAULT
- +#else
- +# define DISABLE_CHANGE 0
- +#endif
- +
- /*
- * Information used for argv parsing.
- */
- @@ -214,16 +231,16 @@
- static Tk_ConfigSpec configSpecs[] = {
- {TK_CONFIG_BORDER, "-activebackground", "activeBackground", "Foreground",
- DEF_SCALE_ACTIVE_BG_COLOR, Tk_Offset(Scale, activeBorder),
- - TK_CONFIG_COLOR_ONLY},
- + TK_CONFIG_COLOR_ONLY | DISABLE_CHANGE},
- {TK_CONFIG_BORDER, "-activebackground", "activeBackground", "Foreground",
- DEF_SCALE_ACTIVE_BG_MONO, Tk_Offset(Scale, activeBorder),
- - TK_CONFIG_MONO_ONLY},
- + TK_CONFIG_MONO_ONLY | DISABLE_CHANGE},
- {TK_CONFIG_BORDER, "-background", "background", "Background",
- DEF_SCALE_BG_COLOR, Tk_Offset(Scale, bgBorder),
- - TK_CONFIG_COLOR_ONLY},
- + TK_CONFIG_COLOR_ONLY | DISABLE_CHANGE},
- {TK_CONFIG_BORDER, "-background", "background", "Background",
- DEF_SCALE_BG_MONO, Tk_Offset(Scale, bgBorder),
- - TK_CONFIG_MONO_ONLY},
- + TK_CONFIG_MONO_ONLY | DISABLE_CHANGE},
- {TK_CONFIG_DOUBLE, "-bigincrement", "bigIncrement", "BigIncrement",
- DEF_SCALE_BIG_INCREMENT, Tk_Offset(Scale, bigIncrement), 0},
- {TK_CONFIG_SYNONYM, "-bd", "borderWidth", (char *) NULL,
- @@ -231,7 +248,7 @@
- {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL,
- (char *) NULL, 0, 0},
- {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- - DEF_SCALE_BORDER_WIDTH, Tk_Offset(Scale, borderWidth), 0},
- + DEF_SCALE_BORDER_WIDTH, Tk_Offset(Scale, borderWidth), DISABLE_CHANGE},
- {TK_CONFIG_STRING, "-command", "command", "Command",
- DEF_SCALE_COMMAND, Tk_Offset(Scale, command), TK_CONFIG_NULL_OK},
- {TK_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
- @@ -245,20 +262,21 @@
- 0},
- {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
- DEF_SCALE_FG_COLOR, Tk_Offset(Scale, textColorPtr),
- - TK_CONFIG_COLOR_ONLY},
- + TK_CONFIG_COLOR_ONLY | DISABLE_CHANGE},
- {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
- DEF_SCALE_FG_MONO, Tk_Offset(Scale, textColorPtr),
- - TK_CONFIG_MONO_ONLY},
- + TK_CONFIG_MONO_ONLY | DISABLE_CHANGE},
- {TK_CONFIG_DOUBLE, "-from", "from", "From",
- DEF_SCALE_FROM, Tk_Offset(Scale, fromValue), 0},
- {TK_CONFIG_COLOR, "-highlightbackground", "highlightBackground",
- "HighlightBackground", DEF_SCALE_HIGHLIGHT_BG,
- - Tk_Offset(Scale, highlightBgColorPtr), 0},
- + Tk_Offset(Scale, highlightBgColorPtr), DISABLE_CHANGE},
- {TK_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_SCALE_HIGHLIGHT, Tk_Offset(Scale, highlightColorPtr), 0},
- {TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness",
- "HighlightThickness",
- - DEF_SCALE_HIGHLIGHT_WIDTH, Tk_Offset(Scale, highlightWidth), 0},
- + DEF_SCALE_HIGHLIGHT_WIDTH, Tk_Offset(Scale, highlightWidth),
- + DISABLE_CHANGE},
- {TK_CONFIG_STRING, "-label", "label", "Label",
- DEF_SCALE_LABEL, Tk_Offset(Scale, label), TK_CONFIG_NULL_OK},
- {TK_CONFIG_PIXELS, "-length", "length", "Length",
- @@ -266,7 +284,7 @@
- {TK_CONFIG_UID, "-orient", "orient", "Orient",
- DEF_SCALE_ORIENT, Tk_Offset(Scale, orientUid), 0},
- {TK_CONFIG_RELIEF, "-relief", "relief", "Relief",
- - DEF_SCALE_RELIEF, Tk_Offset(Scale, relief), 0},
- + DEF_SCALE_RELIEF, Tk_Offset(Scale, relief), DISABLE_CHANGE},
- {TK_CONFIG_INT, "-repeatdelay", "repeatDelay", "RepeatDelay",
- DEF_SCALE_REPEAT_DELAY, Tk_Offset(Scale, repeatDelay), 0},
- {TK_CONFIG_INT, "-repeatinterval", "repeatInterval", "RepeatInterval",
- @@ -276,10 +294,11 @@
- {TK_CONFIG_BOOLEAN, "-showvalue", "showValue", "ShowValue",
- DEF_SCALE_SHOW_VALUE, Tk_Offset(Scale, showValue), 0},
- {TK_CONFIG_PIXELS, "-sliderlength", "sliderLength", "SliderLength",
- - DEF_SCALE_SLIDER_LENGTH, Tk_Offset(Scale, sliderLength), 0},
- + DEF_SCALE_SLIDER_LENGTH, Tk_Offset(Scale, sliderLength),
- + DISABLE_CHANGE},
- {TK_CONFIG_RELIEF, "-sliderrelief", "sliderRelief", "SliderRelief",
- DEF_SCALE_SLIDER_RELIEF, Tk_Offset(Scale, sliderRelief),
- - TK_CONFIG_DONT_SET_DEFAULT},
- + TK_CONFIG_DONT_SET_DEFAULT| DISABLE_CHANGE},
- {TK_CONFIG_UID, "-state", "state", "State",
- DEF_SCALE_STATE, Tk_Offset(Scale, state), 0},
- {TK_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus",
- @@ -291,14 +310,14 @@
- DEF_SCALE_TO, Tk_Offset(Scale, toValue), 0},
- {TK_CONFIG_COLOR, "-troughcolor", "troughColor", "Background",
- DEF_SCALE_TROUGH_COLOR, Tk_Offset(Scale, troughColorPtr),
- - TK_CONFIG_COLOR_ONLY},
- + TK_CONFIG_COLOR_ONLY | DISABLE_CHANGE},
- {TK_CONFIG_COLOR, "-troughcolor", "troughColor", "Background",
- DEF_SCALE_TROUGH_MONO, Tk_Offset(Scale, troughColorPtr),
- - TK_CONFIG_MONO_ONLY},
- + TK_CONFIG_MONO_ONLY | DISABLE_CHANGE},
- {TK_CONFIG_STRING, "-variable", "variable", "Variable",
- DEF_SCALE_VARIABLE, Tk_Offset(Scale, varName), TK_CONFIG_NULL_OK},
- {TK_CONFIG_PIXELS, "-width", "width", "Width",
- - DEF_SCALE_WIDTH, Tk_Offset(Scale, width), 0},
- + DEF_SCALE_WIDTH, Tk_Offset(Scale, width), DISABLE_CHANGE},
- {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
- (char *) NULL, 0, 0}
- };
- @@ -411,6 +430,8 @@
- scalePtr->command = NULL;
- scalePtr->repeatDelay = 0;
- scalePtr->repeatInterval = 0;
- + scalePtr->stipple = None;
- + scalePtr->darkPtr = NULL;
- scalePtr->label = NULL;
- scalePtr->labelLength = 0;
- scalePtr->state = tkNormalUid;
- @@ -423,6 +444,7 @@
- scalePtr->copyGC = None;
- scalePtr->fontPtr = NULL;
- scalePtr->textColorPtr = NULL;
- + scalePtr->troughBackGC = None;
- scalePtr->textGC = None;
- scalePtr->relief = TK_RELIEF_FLAT;
- scalePtr->highlightWidth = 0;
- @@ -656,6 +678,15 @@
- if (scalePtr->textGC != None) {
- Tk_FreeGC(scalePtr->display, scalePtr->textGC);
- }
- + if (scalePtr->darkPtr != NULL) {
- + Tk_FreeColor(scalePtr->darkPtr);
- + }
- + if (scalePtr->stipple != None) {
- + Tk_FreeBitmap(scalePtr->display, scalePtr->stipple);
- + }
- + if (scalePtr->troughBackGC != None) {
- + Tk_FreeGC(scalePtr->display, scalePtr->troughBackGC);
- + }
- Tk_FreeOptions(configSpecs, (char *) scalePtr, scalePtr->display, 0);
- ckfree((char *) scalePtr);
- }
- @@ -692,6 +723,7 @@
- {
- XGCValues gcValues;
- GC newGC;
- + XColor newcolor;
- size_t length;
-
- /*
- @@ -704,6 +736,10 @@
- ScaleVarProc, (ClientData) scalePtr);
- }
-
- +
- + if (Tk_StrictMotif(scalePtr->tkwin)) {
- + flags|=TK_CONFIG_CHECK_MY_FLAG;
- + }
- if (Tk_ConfigureWidget(interp, scalePtr->tkwin, configSpecs,
- argc, argv, (char *) scalePtr, flags) != TCL_OK) {
- return TCL_ERROR;
- @@ -787,19 +823,62 @@
- return TCL_ERROR;
- }
-
- - Tk_SetBackgroundFromBorder(scalePtr->tkwin, scalePtr->bgBorder);
-
- + Tk_SetBackgroundFromBorder(scalePtr->tkwin, scalePtr->bgBorder);
- + gcValues.background = scalePtr->troughColorPtr->pixel;
- gcValues.foreground = scalePtr->troughColorPtr->pixel;
- newGC = Tk_GetGC(scalePtr->tkwin, GCForeground, &gcValues);
- if (scalePtr->troughGC != None) {
- Tk_FreeGC(scalePtr->display, scalePtr->troughGC);
- }
- scalePtr->troughGC = newGC;
- +
- if (scalePtr->copyGC == None) {
- gcValues.graphics_exposures = False;
- scalePtr->copyGC = Tk_GetGC(scalePtr->tkwin, GCGraphicsExposures,
- &gcValues);
- }
- +
- +
- +/* Force a borderwidth of 1 */
- + scalePtr->borderWidth = 1;
- +
- + if (scalePtr->stipple==None) {
- + scalePtr->stipple = Tk_GetBitmap((Tcl_Interp *)NULL, scalePtr->tkwin,
- + Tk_GetUid("gray50"));
- + if (scalePtr->stipple == None) {
- + panic("ScrollBar couldn't allocate bitmap for trough");
- + }
- + }
- +
- + Tk_SetBackgroundFromBorder(scalePtr->tkwin, scalePtr->bgBorder);
- + /* alloc color for trough base stipple */
- + newcolor.red = (60 * (int) scalePtr->troughColorPtr->red)/100;
- + newcolor.green =(60 * (int) scalePtr->troughColorPtr->green)/100;
- + newcolor.blue = (60 * (int) scalePtr->troughColorPtr->blue)/100;
- +
- + if (scalePtr->darkPtr != NULL) {
- + Tk_FreeColor(scalePtr->darkPtr);
- + }
- + scalePtr->darkPtr = Tk_GetColorByValue(scalePtr->tkwin,
- + &newcolor);
- +
- + gcValues.background = scalePtr->troughColorPtr->pixel;
- + gcValues.foreground = scalePtr->darkPtr->pixel;
- + gcValues.stipple = scalePtr->stipple;
- + gcValues.fill_style = FillOpaqueStippled;
- +
- + newGC = Tk_GetGC(scalePtr->tkwin, GCForeground|GCBackground|GCStipple|
- + GCFillStyle, &gcValues);
- + if (scalePtr->troughBackGC != None) {
- + Tk_FreeGC(scalePtr->display, scalePtr->troughBackGC);
- + }
- + scalePtr->troughBackGC = newGC;
- +
- +
- +
- +
- +
- if (scalePtr->highlightWidth < 0) {
- scalePtr->highlightWidth = 0;
- }
- @@ -1086,6 +1165,13 @@
- int x, y, width, height, shadowWidth;
- double tickValue;
- Tk_3DBorder sliderBorder;
- + GC darkGC, dark2GC, lightGC, light2GC;
- +
- +
- + darkGC = Tk_3DBorderGC(tkwin,scalePtr->bgBorder, TK_3D_DARK_GC);
- + dark2GC = Tk_3DBorderGC(tkwin,scalePtr->bgBorder, TK_3D_DARK2_GC);
- + lightGC = Tk_3DBorderGC(tkwin,scalePtr->bgBorder, TK_3D_LIGHT_GC);
- + light2GC = Tk_3DBorderGC(tkwin,scalePtr->bgBorder, TK_3D_DARK_GC);
-
- /*
- * Display the information from left to right across the window.
- @@ -1143,17 +1229,18 @@
- * Display the trough and the slider.
- */
-
- - Tk_Draw3DRectangle(tkwin, drawable,
- - scalePtr->bgBorder, scalePtr->vertTroughX, scalePtr->inset,
- - scalePtr->width + 2*scalePtr->borderWidth,
- - Tk_Height(tkwin) - 2*scalePtr->inset, scalePtr->borderWidth,
- - TK_RELIEF_SUNKEN);
- - XFillRectangle(scalePtr->display, drawable, scalePtr->troughGC,
- +
- + XFillRectangle(scalePtr->display, drawable, scalePtr->troughBackGC,
- scalePtr->vertTroughX + scalePtr->borderWidth,
- scalePtr->inset + scalePtr->borderWidth,
- (unsigned) scalePtr->width,
- (unsigned) (Tk_Height(tkwin) - 2*scalePtr->inset
- - 2*scalePtr->borderWidth));
- + Tk_Draw3DRectangle(tkwin, drawable,
- + scalePtr->activeBorder, scalePtr->vertTroughX, scalePtr->inset,
- + scalePtr->width + 2*scalePtr->borderWidth,
- + Tk_Height(tkwin) - 2*scalePtr->inset, scalePtr->borderWidth,
- + TK_RELIEF_SUNKEN);
- if (scalePtr->state == tkActiveUid) {
- sliderBorder = scalePtr->activeBorder;
- } else {
- @@ -1163,21 +1250,59 @@
- height = scalePtr->sliderLength/2;
- x = scalePtr->vertTroughX + scalePtr->borderWidth;
- y = ValueToPixel(scalePtr, scalePtr->value) - height;
- - shadowWidth = scalePtr->borderWidth/2;
- + /* We know borderwidth is 1 */
- + shadowWidth = scalePtr->borderWidth+1;
- +/*
- if (shadowWidth == 0) {
- shadowWidth = 1;
- }
- - Tk_Draw3DRectangle(tkwin, drawable, sliderBorder, x, y, width,
- - 2*height, shadowWidth, scalePtr->sliderRelief);
- +
- + Tk_Draw3DRectangle(tkwin, drawable, scalePtr->activeBorder, x, y, width,
- + 2*height, shadowWidth, TK_RELIEF_RAISED);
- +
- x += shadowWidth;
- y += shadowWidth;
- - width -= 2*shadowWidth;
- + width -= shadowWidth;
- height -= shadowWidth;
- - Tk_Fill3DRectangle(tkwin, drawable, sliderBorder, x, y, width,
- - height, shadowWidth, scalePtr->sliderRelief);
- - Tk_Fill3DRectangle(tkwin, drawable, sliderBorder, x, y+height,
- - width, height, shadowWidth, scalePtr->sliderRelief);
- -
- +*/
- +/* Ugly! :-) */
- +
- + Tk_Fill3DRectangle(tkwin, drawable, scalePtr->bgBorder, x, y, width,
- + 2*height, 2, TK_RELIEF_FLAT);
- + /*
- + XDrawLine(scalePtr->display, drawable, lightGC, x, y, x+width-shadowWidth, y);
- + XDrawLine(scalePtr->display, drawable, lightGC, x, y, x, y+2*height-shadowWidth);
- + XDrawLine(scalePtr->display, drawable, lightGC, x, y+height, x+width-shadowWidth, y+height);
- +
- + XDrawLine(scalePtr->display, drawable, dark2GC, x+1, y+2*height-1, x+width-1, y+2*height-1);
- + XDrawLine(scalePtr->display, drawable, dark2GC, x+width-1, y+2*height-shadowWidth, x+width-1, y+1);
- + XDrawLine(scalePtr->display, drawable, darkGC, x+width-1, y+height-1, x+1, y+height-1);
- +
- + XDrawLine(scalePtr->display, drawable, light2GC, x+1, y+height-2, x+width-shadowWidth, y+height-2);
- + XDrawLine(scalePtr->display, drawable, light2GC, x+width-shadowWidth, y+height-2, x+width-shadowWidth, y+1);
- +
- + XDrawLine(scalePtr->display, drawable, light2GC, x+1, y+2*height-2, x+width-shadowWidth, y+2*height-2);
- + XDrawLine(scalePtr->display, drawable, light2GC, x+width-shadowWidth, y+2*height-2, x+width-shadowWidth, y+height+1);
- + *
- + * Re-uglyfication
- + */
- + XDrawLine(scalePtr->display, drawable, lightGC, x, y, x, y+2*height-shadowWidth);
- + XDrawLine(scalePtr->display, drawable, lightGC, x+1, y, x+1, y+2*height-shadowWidth);
- +
- + XDrawLine(scalePtr->display, drawable, dark2GC, x+width-1, y+2*height-shadowWidth, x+width-1, y+1);
- + XDrawLine(scalePtr->display, drawable, darkGC, x+width-2, y+2*height-shadowWidth, x+width-2, y+1);
- +
- +
- + XDrawLine(scalePtr->display, drawable, lightGC, x+1, y, x+width-2, y);
- +
- + XDrawLine(scalePtr->display, drawable, darkGC, x+1, y+height-2, x+width-2, y+height-2);
- + XDrawLine(scalePtr->display, drawable, lightGC, x+1, y+height-1, x+width-2, y+height-1);
- +
- + XDrawLine(scalePtr->display, drawable, darkGC, x, y+height*2-3, x+width-2, y+height*2-3);
- + XDrawLine(scalePtr->display, drawable, dark2GC, x, y+height*2-2, x+width-1, y+height*2-2);
- + XDrawLine(scalePtr->display, drawable, darkGC, x, y+height*2-1, x+width-1, y+height*2-1);
- +
- +
- /*
- * Draw the label to the right of the scale.
- */
- @@ -1282,6 +1407,12 @@
- int x, y, width, height, shadowWidth;
- double tickValue;
- Tk_3DBorder sliderBorder;
- + GC lightGC, light2GC, darkGC, dark2GC;
- +
- + darkGC = Tk_3DBorderGC(tkwin,scalePtr->bgBorder, TK_3D_DARK_GC);
- + dark2GC = Tk_3DBorderGC(tkwin,scalePtr->bgBorder, TK_3D_DARK2_GC);
- + lightGC = Tk_3DBorderGC(tkwin,scalePtr->bgBorder, TK_3D_LIGHT_GC);
- + light2GC = Tk_3DBorderGC(tkwin,scalePtr->bgBorder, TK_3D_DARK_GC);
-
- /*
- * Display the information from bottom to top across the window.
- @@ -1345,7 +1476,7 @@
- Tk_Width(tkwin) - 2*scalePtr->inset,
- scalePtr->width + 2*scalePtr->borderWidth,
- scalePtr->borderWidth, TK_RELIEF_SUNKEN);
- - XFillRectangle(scalePtr->display, drawable, scalePtr->troughGC,
- + XFillRectangle(scalePtr->display, drawable, scalePtr->troughBackGC,
- scalePtr->inset + scalePtr->borderWidth,
- y + scalePtr->borderWidth,
- (unsigned) (Tk_Width(tkwin) - 2*scalePtr->inset
- @@ -1360,21 +1491,60 @@
- height = scalePtr->width;
- x = ValueToPixel(scalePtr, scalePtr->value) - width;
- y += scalePtr->borderWidth;
- - shadowWidth = scalePtr->borderWidth/2;
- + /* We know scalePtr->borderWidth is 1 */
- + shadowWidth = scalePtr->borderWidth+1;
- +/*
- if (shadowWidth == 0) {
- shadowWidth = 1;
- }
- - Tk_Draw3DRectangle(tkwin, drawable, sliderBorder,
- - x, y, 2*width, height, shadowWidth, scalePtr->sliderRelief);
- + Tk_Draw3DRectangle(tkwin, drawable, scalePtr->activeBorder,
- + x, y, 2*width, height, shadowWidth, TK_RELIEF_RAISED);
- x += shadowWidth;
- y += shadowWidth;
- width -= shadowWidth;
- height -= 2*shadowWidth;
- - Tk_Fill3DRectangle(tkwin, drawable, sliderBorder, x, y, width, height,
- - shadowWidth, scalePtr->sliderRelief);
- - Tk_Fill3DRectangle(tkwin, drawable, sliderBorder, x+width, y,
- - width, height, shadowWidth, scalePtr->sliderRelief);
- + Tk_Fill3DRectangle(tkwin, drawable, scalePtr->bgBorder, x, y, width, height,
- + shadowWidth, TK_RELIEF_RAISED);
- + Tk_Fill3DRectangle(tkwin, drawable, scalePtr->bgBorder, x+width, y,
- + width, height, shadowWidth, TK_RELIEF_RAISED);
- + XDrawLine(scalePtr->display, drawable, lightGC, x+width, y, x+width, y+height-2);
- +*/
- + Tk_Fill3DRectangle(tkwin, drawable, scalePtr->bgBorder, x, y, 2*width,
- + height, 2, TK_RELIEF_FLAT);
- + /*
- + XDrawLine(scalePtr->display, drawable, lightGC, x, y, x+2*width-2, y);
- + XDrawLine(scalePtr->display, drawable, lightGC, x, y, x, y+height-2);
- + XDrawLine(scalePtr->display, drawable, lightGC, x+width, y, x+width, y+height-2);
- +
- + XDrawLine(scalePtr->display, drawable, dark2GC, x+1, y+height-1, x+2*width-1, y+height-1);
- + XDrawLine(scalePtr->display, drawable, dark2GC, x+2*width-1, y+height-1, x+2*width-1, y+1);
- + XDrawLine(scalePtr->display, drawable, darkGC, x+width-1, y+height-1, x+width-1, y+1);
- +
- + XDrawLine(scalePtr->display, drawable, light2GC, x+1, y+height-2, x+width-shadowWidth, y+height-2);
- + XDrawLine(scalePtr->display, drawable, light2GC, x+width-shadowWidth, y+height-2, x+width-2, y+1);
- +
- + XDrawLine(scalePtr->display, drawable, light2GC, x+width+1, y+height-2, x+2*width-2, y+height-2);
- + XDrawLine(scalePtr->display, drawable, light2GC, x+2*width-2, y+height-2, x+2*width-2, y+1);
- +
- + */
- +
- + XDrawLine(scalePtr->display, drawable, lightGC, x, y, x+2*width-2, y);
- +
- + XDrawLine(scalePtr->display, drawable, darkGC, x, y+height-2, x+2*width-2, y+height-2);
- + XDrawLine(scalePtr->display, drawable, dark2GC, x, y+height-1, x+2*width-2, y+height-1);
- +
- +
- + XDrawLine(scalePtr->display, drawable, lightGC, x, y, x, y+height-2);
- + XDrawLine(scalePtr->display, drawable, lightGC, x+1, y, x+1, y+height-3);
- +
- + XDrawLine(scalePtr->display, drawable, darkGC, x+width-2, y+1, x+width-2, y+height-3);
- + XDrawLine(scalePtr->display, drawable, lightGC, x+width-1, y, x+width-1, y+height-2);
- +
- + XDrawLine(scalePtr->display, drawable, darkGC, x+2*width-3, y, x+2*width-3, y+height-2);
- + XDrawLine(scalePtr->display, drawable, dark2GC, x+2*width-2, y, x+2*width-2, y+height-1);
- + XDrawLine(scalePtr->display, drawable, darkGC, x+2*width-1, y, x+2*width-1, y+height-1);
-
- +
- /*
- * Draw the label at the top of the scale.
- */
-